package com.lcxw.hxzb.friendcircle.project.system.service.impl;

import java.util.List;

import com.lcxw.hxzb.friendcircle.common.utils.DateUtils;
import com.lcxw.hxzb.friendcircle.project.system.domain.YwpdRank;
import com.lcxw.hxzb.friendcircle.project.system.mapper.YwpdRankMapper;
import com.lcxw.hxzb.friendcircle.project.system.service.IYwpdRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 情侣等级Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-27
 */
@Service
public class YwpdRankServiceImpl implements IYwpdRankService
{
    @Autowired
    private YwpdRankMapper ywpdRankMapper;

    /**
     * 查询情侣等级
     * 
     * @param rankId 情侣等级ID
     * @return 情侣等级
     */
    @Override
    public YwpdRank selectYwpdRankById(Long rankId)
    {
        return ywpdRankMapper.selectYwpdRankById(rankId);
    }

    /**
     * 查询情侣等级列表
     * 
     * @param ywpdRank 情侣等级
     * @return 情侣等级
     */
    @Override
    public List<YwpdRank> selectYwpdRankList(YwpdRank ywpdRank)
    {
        return ywpdRankMapper.selectYwpdRankList(ywpdRank);
    }

    /**
     * 新增情侣等级
     * 
     * @param ywpdRank 情侣等级
     * @return 结果
     */
    @Override
    public int insertYwpdRank(YwpdRank ywpdRank)
    {
        ywpdRank.setCreateTime(DateUtils.getNowDate());
        return ywpdRankMapper.insertYwpdRank(ywpdRank);
    }

    /**
     * 修改情侣等级
     * 
     * @param ywpdRank 情侣等级
     * @return 结果
     */
    @Override
    public int updateYwpdRank(YwpdRank ywpdRank)
    {
        return ywpdRankMapper.updateYwpdRank(ywpdRank);
    }

    /**
     * 批量删除情侣等级
     * 
     * @param rankIds 需要删除的情侣等级ID
     * @return 结果
     */
    @Override
    public int deleteYwpdRankByIds(Long[] rankIds)
    {
        return ywpdRankMapper.deleteYwpdRankByIds(rankIds);
    }

    /**
     * 删除情侣等级信息
     * 
     * @param rankId 情侣等级ID
     * @return 结果
     */
    @Override
    public int deleteYwpdRankById(Long rankId)
    {
        return ywpdRankMapper.deleteYwpdRankById(rankId);
    }
}
